-module(stimer).
-export([start/2, cnacel]).

start(Time, Fun) -> spawn(fun() -> timer(Time, Fun) end).

cancel(Pid) -> Pid ! cancel.

timer(Time, Fun) ->
  receive
    cancel -> void
  after Time ->
          Fun()
  end.


